--- doc/Makefile	2008-05-15 15:33:13.000000000 -0500
+++ doc/Makefile-doc.slack	2008-05-15 15:29:34.000000000 -0500
@@ -45,6 +45,7 @@
 MANEXT	= 6
 
 # manual installation for most BSD-style systems
+MANDIRCREATE = mkdir -p $(DESTDIR)/$(MANDIR)
 GAMEMANCREATE = cp nethack.6
 LEVMANCREATE = cp lev_comp.6
 DGNMANCREATE = cp dgn_comp.6
@@ -58,11 +59,12 @@
 # DLBMANCREATE = nroff -man dlb.6 >
 
 manpages:
-	-$(GAMEMANCREATE) $(MANDIR)/$(GAME).$(MANEXT)
-	-$(LEVMANCREATE) $(MANDIR)/lev_comp.$(MANEXT)
-	-$(DGNMANCREATE) $(MANDIR)/dgn_comp.$(MANEXT)
-	-$(RCVRMANCREATE) $(MANDIR)/recover.$(MANEXT)
-	-$(DLBMANCREATE) $(MANDIR)/dlb.$(MANEXT)
+	-$(MANDIRCREATE)
+	-$(GAMEMANCREATE) $(DESTDIR)/$(MANDIR)/$(GAME).$(MANEXT)
+	-$(LEVMANCREATE) $(DESTDIR)/$(MANDIR)/lev_comp.$(MANEXT)
+	-$(DGNMANCREATE) $(DESTDIR)/$(MANDIR)/dgn_comp.$(MANEXT)
+	-$(RCVRMANCREATE) $(DESTDIR)/$(MANDIR)/recover.$(MANEXT)
+	-$(DLBMANCREATE) $(DESTDIR)/$(MANDIR)/dlb.$(MANEXT)
 
 # manual creation for distribution
 DISTRIB = Guidebook.txt nethack.txt lev_comp.txt dgn_comp.txt recover.txt dlb.txt
